home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / NETNEWS_ / NEWS_SRC / UTILITY.C < prev   
C/C++ Source or Header  |  1990-10-14  |  636b  |  35 lines

  1. #include "Global.h"
  2. #include "Constants.h"
  3.  
  4. void
  5. errmsg(type,s,a,b,c,d,e,f,g)        /* varargs, what varargs? */
  6. char *s;
  7. {
  8.     char mbuf[256];
  9.     sprintf(mbuf,s,a,b,c,d,e,f,g);
  10.     CtoPstr(mbuf);        
  11.  
  12.     ParamText(mbuf, "", "", "");
  13.     PositionDialog('ALRT', ALRTgeneral, 0);
  14.     InitCursor();
  15.     if (type == 3)
  16.         StopAlert(ALRTgeneral, NULL);
  17.     else if (type == 2)
  18.         CautionAlert(ALRTgeneral, NULL);
  19.     else
  20.         NoteAlert(ALRTgeneral, NULL);
  21. }
  22.  
  23. askYesNo(s,a,b,c,d,e,f,g)
  24. char *s;
  25. {
  26.     char mbuf[256];
  27.     sprintf(mbuf,s,a,b,c,d,e,f,g);
  28.     CtoPstr(mbuf);        
  29.  
  30.     ParamText(mbuf, "", "", "");
  31.     PositionDialog('ALRT', 130, 0);
  32.     InitCursor();
  33.     return (Alert(130, NULL) == 1);
  34. }
  35.